<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
	<h:form id="userList">
		<p:dataTable id="userTable" value="#{userList.dataModel}"
			selection="#{userList.selectedEntities}" paginator="true"
			var="entity" rows="15"
			paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
			rowsPerPageTemplate="10,15,20" lazy="true">

			<f:facet name="header">
				<p:commandButton value="New" />
				<p:button value="Delete" />
			</f:facet>

			<!--                    <p:ajax event="rowSelect" listener="#{userList.onRowSelect}" -->
			<!--                            update=":userForm:userDetail" oncomplete="userDetailDialog.show()" /> -->

			<p:column selectionMode="multiple" style="width:2%" />

			<p:column style="width:2%">
				<p:commandButton id="userEditButton"
					action="#{userList.editAction(entity)}" icon="ui-icon-search" />
			</p:column>

			<p:column headerText="User name" sortBy="#{entity.username}"
				filterBy="#{entity.username}">
				<h:outputText value="#{entity.username}" />
			</p:column>

			<p:column headerText="Password" sortBy="#{entity.password}"
				filterBy="#{entity.password}">
				<h:outputText value="#{entity.password}" />
			</p:column>
		</p:dataTable>
	</h:form>
</ui:composition>
